import http from '@/utils/request'

export function addMenu(data) {
  return http({
    url: '/sys/menu/save',
    method: 'post',
    data: data
  })
}

export function getInfo(token) {
  return http({
    url: '/user/info',
    method: 'get',
    params: { token }
  })
}

export function logout() {
  return http({
    url: '/user/logout',
    method: 'post'
  })
}

// 请求后台获取菜单信息
export function getMenusInfo() {
  return http({
    url: '/sys/currentUser/menus',
    method: 'get'
  })
}
